Creating Spring Bean Class

From Documentation
Creating Spring Bean Class


Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


For OOP programming, you have to define a DataSource interface:

DataSource.java

 package test;
 
 public interface DataSource
 {
   java.util.List getElementsList();
 }

and its implementation:

DataSourceImpl.java

 package test;
 
 import java.util.*;
 
 public class DataSourceImpl implements DataSource
 {
   public List getElementsList()
   {
        List list = new ArrayList();
         list.add("Tom");
         list.add("Henri");
         list.add("Jim");
         
         return list;
   }
 }


Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.